package com.atguigu.day17.work;

public class Work3 {
    public static void main(String[] args) {
        Integer[] arr={1,2,3,4,5};
        method(arr,1,3);
        for (Integer integer : arr) {
            System.out.println(integer);
        }
    }
    public static<T>void method(T[]arr,int a,int b){
        T temp=arr[a];
        arr[a]=arr[b];
        arr[b]=temp;
    }
}
